package com.laycoding.provider.registry;

import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class RpcThread extends Thread{
    private String path;

    private ZkRegistry zkRegistry;
    public RpcThread(String path,ZkRegistry zkRegistry) {
        this.path = path;
        this.zkRegistry =zkRegistry;
    }

    @Override
    public void run() {
        try {
            zkRegistry.deleteReginstry(path);
            //("service");
            log.info(path+" service deleted...");
        }catch (Exception e){
          e.printStackTrace();
        }
    }
}
